#include <Windows.h>
#include<stdio.h>
int main()
{
	char szFileName[128] = "C\:\\Users\\Administrator\\Desktop\\test.txt";
	short arrayIn[5] = { 0,1,2,3,4 };
	short arrayOut[5] = { 0,0,0,0,0 };

	FILE* fp;
	printf("%d\n",(fopen_s(&fp, szFileName, "w+b")));
	fwrite(arrayIn, sizeof(short), 5, fp);
	fseek(fp, 0, SEEK_SET);
	fread(arrayOut, sizeof(short), 5, fp);
	for (auto& it:arrayOut)
	{
		printf("%d\n", it);
	}
	fclose(fp);
	system("pause");
}
